package com.fc2.blog96.nonbirimuchiki.SlideShowClient;

import java.io.Serializable;
import java.util.UUID;

import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;

public final class common
{
	public static final String MENU_BLUETOOTH_SETTING = "Bluetooth Setting";  //menuの文字設定
	public static final int    MENU_BLUETOOTH_SETTING_VALUE = 0;              //menu番号
	public static final String Menu_EXIT = "EXIT";                            //終了
	public static final int    MENU_EXIT_VALUE = 1;                           //終了のメニュー番号

	public static final int BLUETOOTH_SLEEP_TIME = 100; //[ms]
	public static final int BLUETOOTH_TIMEOUT = 1000;  //[ms]
	public static final int BLUETOOTH_SLEEP_MAX = BLUETOOTH_TIMEOUT/BLUETOOTH_SLEEP_TIME;

	public static final int    IMAGE_FLUSH_TIME = 1000;  //[ms]

	public static final UUID MUCHIKI0226_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");

	public static final class AlertDialogMode
	{
		public static final int ALERT_DIALOG_MODE_FINISH = 0;  //終了ダイアログ設定
	}

	public static final class IntentKey
	{
		public static final String BLUETOOTH_MANAGER = "BluetoothManager";    //bluetoothの設定値などを管理しているクラス取得
	}

	public static final class SocketRequest
	{
		public static final String IMAGE_INFO_REQUEST = "GET Image Info\r\n";
		public static final String IMAGE_DATA_REQUEST = "GET Image data\r\n";
		public static final class ImageInfo
		{
			//infoの内容
			//info(w:123,h:123,pix:4)
			public static final String WIDTH_START = "w:";
			public static final String WIDTH_END   = ",h";
			public static final String HEIGHT_START = "h:";
			public static final String HEIGHT_END   = ",pix";
			public static final String PIXEL_START = "pix:";
			public static final String PIXEL_END   = ",s";
			public static final String DATASIZE_START = ",s:";
			public static final String DATASIZE_END = ")";
		}
	}

	public static final String FOLDER_PATH = "/mnt/sdcard/SlideShow";
}

class ImageInfo
{
	public int width;
	public int height;
	public int pix;
	public int size;
}

class BluetoothManager implements Serializable
{
	public static BluetoothAdapter  btAdapter;
	public static BluetoothDevice   btDevice;
	public static BluetoothSocket btClientSocket;
}